﻿angular.module('picShare').directive('usersAlbumNames', function (albumsAndUserDataSvc, albumsSvc, $rootScope) {
    return {
        restrict: 'C',
        templateUrl:"/Templates/Include-Templates/users-albums.html",
        link: function (scope, element, attrs, controller) {
            scope.$watch(function () {
                return albumsAndUserDataSvc.usersAlbumsData;
            }, function (newVal) {
                scope.usersWithAlbumsList = newVal;
            });
        }
    };
});